package com.cpj.bsyyzx.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 五个臭皮匠
 * @since 2021-05-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Permission implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "permission_id", type = IdType.AUTO)
    private Integer permissionId;

    /**
     * 权限名称
     */
    private String name;

    /**
     * 地址
     */
    private String url;

    /**
     * 0-按钮 1-导航
     */
    private Integer type;

    /**
     * 上级id;最高级上级为0
     */
    private Integer parentId;

    private Integer active;

    @TableField(exist = false)
    private List<Permission> children;
}
